package main

import (
	"flag"
	"time"
)

var (
	log_config = new(xmlLoggerConfig) // xml配置
    longConfigFile = flag.String("config", "config.xml", "")
)

func init() {
	err := LoadConfiguration(*longConfigFile, log_config)
	if err != nil {
		panic(err)
		return
	}
}

func main() {
	err := InitLog()
	if err != nil {
		panic(err)
		return
	}
	for  {
		log.Info("[Log4g Test yd %d]",1)
		log.Warn("[Log4g Test %d]", 2)
	}

	time.Sleep(time.Second)
}
